﻿@model IEnumerable<TCC.CMFlow.Models.MenuSistema>

<div class="navbar navbar-inverse navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            @Html.ActionLink("CMFlow", "Index", "Home", null, new { @class = "navbar-brand" })
        </div>

        <div class="navbar-collapse collapse">
            <ul class="nav navbar-nav">
                @foreach (var item in Model)
                {
                    <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" href="#">
                            @item.Nome
                            <i class="fa fa-angle-down pull-right"></i>
                        </a>

                        <ul class="dropdown-menu">
                            @foreach (var subItem in item.ModulosSistema)
                            {
                                <li>@Html.ActionLink(subItem.Nome, subItem.ActionName, subItem.ControllerName)</li>
                            }
                        </ul>
                    </li>
                }
            </ul>
            @Html.Partial("_LoginPartial")
        </div>
    </div>
</div>
